<?php

namespace App\Console\Commands;

use App\Services\SendSms;
use Illuminate\Console\Command;
use App\Interfaces\SolrService;
use Illuminate\Contracts\Bus\SelfHandling;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
class MassMessage extends Command implements SelfHandling
{
    use InteractsWithQueue,SerializesModels;
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
   // protected $signature = 'massMessage';

    /**
     * The console command description.
     *
     * @var string
     */
    //protected $description = '群发口令短信';

    public function __construct($phone,$command,$templateId,$signature)
    {
        $this->phone = $phone;
        $this->command = $command;
        $this->templateId = $templateId;
        $this->signature = $signature;
    }

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle(SendSms $sendSms)
    {
        $result = $sendSms->sendMsg($this->phone, $this->command, $templateId='', $signature='');
        return $result;
    }
}
